;*****************7 Segment Procedure************
DISPLAY_SHIFT_LEFT PROC FAR
	push BX
	mov BX,AX
	push AX

	mov DS:Display_isNumber,0

	mov AL,DS:SegNum[1]
	mov DS:SegNum[0],AL

	mov AL,DS:SegNum[2]
	mov DS:SegNum[1],AL

	mov AL,DS:SegNum[3]
	mov DS:SegNum[2],AL

	mov AL,DS:SegNum[4]
	mov DS:SegNum[3],AL

	mov AL,DS:SegNum[5]
	mov DS:SegNum[4],AL

	mov DS:SegNum[5],BL

	pop AX
	pop BX
	ret
DISPLAY_SHIFT_LEFT endp

display7segment 	proc far
	push ax
	push BX
	push dx
  	push DS

	xor AX,AX
	mov al,DS:SegCounter
	mov SI,AX
	inc DS:SegCounter

	cmp DS:SegCounter,6
	jl reset_segCounter_finished
		mov DS:SegCounter,0
	reset_segCounter_finished:

	xor bx,bx
	mov bl,SegNum[SI]
	mov al,SegPattern[BX]
	mov	dx,PCS2

;if(Display_isNumber==1 & is the unit digit)
;	add decimal point
;else display normal
	cmp DS:Display_isNumber,1
	jne normal_pattern
	cmp SI,3
	jne normal_pattern

	;add_decimal_point:
	or al,40h ;dot pattern
normal_pattern:
	out	dx,al

;	call far ptr print_2hex

	mov dx,PCS3
	mov al,SegPosition[SI]
	out dx,al

	pop ds
	pop dx
	pop bx
	pop ax
	ret
display7segment endp